package com.runa.rccprotocol.analysis.En13757.decoder;

import com.runa.protocol.util.ByteUtil;

/**
 * @author diandian
 * @Date 2021/11/10 16:02
 */
public class Dif_Function_Bcd implements Dif_Function {
    private boolean order = false;

    public Dif_Function_Bcd(boolean order) {
        this.order = order;
    }

    @Override
    public Integer handle(byte[] dataByte, int index, int length) {
        return ByteUtil.bcdToInt(dataByte, index, length, order);
    }
}